import request from '@/config/axios'
// import type { TableData } from './types'

export const getRoleTableListApi = (params: any): Promise<LoginResponse> => {
  return request.get({ url: '/sys/role/list', params })
}
export const getUserRoleListApi = (params: any) => {
  return request.get({ url: '/sys/user/userRoleList', params })
}
// 查询角色下权限
export const getRoleByIdtApi = (params: any) => {
  return request.get({ url: '/sys/permission/queryRolePermission', params })
}
// 查询已有用户
export const getUserListApi = (params: any) => {
  return request.get({ url: '/sys/user/list', params })
}

export const delTableListApi = (ids: string[] | number[]): Promise<IResponse> => {
  return request.post({ url: '/example/delete', data: { ids } })
}
